<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
//            "_id": {
//            },
//            "category_id": {
//            },
//            "category_name": "二次元",
//            "coll": [],
//            "image": "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-94b6983c-00f5-468e-8b5f-ca5612fe92e1/6c08570f-f315-4787-b957-734e3724282a.jpg",
//            "images": [
//                "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-94b6983c-00f5-468e-8b5f-ca5612fe92e1/6c08570f-f315-4787-b957-734e3724282a.jpg",
//                "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-94b6983c-00f5-468e-8b5f-ca5612fe92e1/4f71589c-cc13-4338-a411-d2176eb42775.jpg",
//                "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-94b6983c-00f5-468e-8b5f-ca5612fe92e1/31722d06-6b9b-4076-a27f-f762a838e616.jpg"
//            ],
//            "mode": 0,
//            "name": "动漫壁纸",
//            "status": 1,
//            "tags": "抖音热图,潮图,国漫推荐",
//            "time": 1622219366311,
//            "user_id": {
//                "$oid": "60b119cb70f77400014e18c9"
//            },
//            "view": 6,
//            "zan": []

        Schema::create('covers', function (Blueprint $table) {
            $table->id();
            $table->string('name')->comment('名称');
            $table->unsignedInteger('user_id')->comment('用户id');
            $table->unsignedInteger('category_id')->comment('分类id');
            $table->string('category_name')->comment('分类名称');
            $table->string('image')->nullable()->comment('图片');
            $table->text('images')->nullable()->comment('图片组');
            $table->unsignedInteger('mode')->comment('模式');
            $table->unsignedTinyInteger('status')->comment('状态');
            $table->string('tags')->comment('标签');
            $table->unsignedBigInteger('view')->comment('浏览量');
            $table->unsignedBigInteger('zan')->comment('点赞量');
            $table->unsignedBigInteger('coll')->comment('收藏量');

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('covers');
    }
};
